{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Bayesian Neural Networks\n",
    "\n",
    "$$\n",
    "    p({\\bf w}| \\mathcal{D}, \\beta, \\alpha) = \\prod_{n=1}^N \\mathcal{N}(t_n | y(x_n, \\bf{w}), \\beta^{-1})\\cdot \\mathcal{N}({\\bf w} | {\\bf 0}, \\alpha^{-1}{\\bf I})\n",
    "$$\n",
    "\n",
    "Where $y(x_n, \\bf{w})$ is the output of a feedforward neural network.\n",
    "\n",
    "It can be shown that\n",
    "\n",
    "$$\n",
    "p({\\bf w}| \\mathcal{D}, \\beta, \\alpha) \\propto \\exp\\left(-\\frac{1}{2}\\left[\\beta \\sum_n \\left(t_n - y(x_n, {\\bf w})\\right)^2 + \\alpha ||{\\bf w}||^2\\right]\\right)\n",
    "$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from numpy.random import randn, uniform, seed"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x121a7a2b0>"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD4CAYAAAAJmJb0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAXfklEQVR4nO3df6xcZZ3H8fdnS4W7MesFencpl5aWyHYlVlqdIG6TFdG1QDa0W3G3GBVcTCML65rVZkE3uJJsCmsiUTGyVVjANYAidqvUELAQdQPorS0/SlMpGENvu/YCFiTWLsXv/jHnynR65s6Ze8/MnHPm80omnTnnmTPfPH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roPAL4F7ku0nApsa2p0H/Iz6b9lPNWw/hfp/uF3AN4Gjc4zteOD7wJPJv8cl22vAVxvaLaC+PPMfNL1/M/AY9QT1X8Brc+67tvEBf57E8Ejy7yVF6Tvg/cDLwLaGx5Ju9V3azxD1EtD5yfNjkn7YlfTLKQ3v/VTyvp3AuV34f9AutvuS/x+T/bSx3ffbw9jWAduTGO4H/qzhvX+X9Ocu4EN5x5YlvuT1vwLXNL2vq31H/aRvb/Izvpv6WMpHgI8k+0X9vtpPJZ9fa3hvx/3mZQ3MzCqs7OUaMzObgpO8mVmFOcmbmVWYk7yZWYU5yZuZVZiTvJlZhTnJm5lV2P8D0UqJUJodTX4AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "seed(2718)\n",
    "nsamples = 30\n",
    "a, b = 1.4, 2\n",
    "x = uniform(-1, 1, nsamples)\n",
    "y = a * x + b + randn(nsamples) * 0.5\n",
    "\n",
    "plt.scatter(x, y)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.collections.PathCollection at 0x122ff8fd0>"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAD4CAYAAAAJmJb0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAXSElEQVR4nO3df4wc5X3H8fcnhw1XNclB7LRwNtiRHDc0rnLJiUa1VAgJscMftmNoaqQ0kCaxkoZEbRqrRkSUUFV2QiWkqLSpU9H8qIohhDhHcXoiGJQqgtSHzI/Y6ODi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vJh4B9T9VYAU8Br6u6/D3iMWoL6Z+DXc267lvEBv5fE8Ejy70eK0nbAB4HjwMOpv7d1qu0anUPUhoA2JLfPSNphImmXN6Xue21yv3HgfR14HbSK7XvJ62OmnUZaPb9djG0HcDCJ4T7gt1L3/eOkPSeAD+cdW5b4ku3rgZ119+to21Hr9D2dnOOT1K6lfBz4eLJfwM1J3I+Rml3YTrt5WQMzswor+3CNmZnNwknezKzCnOTNzCrMSd7MrMKc5M3MKsxJ3syswpzkzcwq7P8BWeih95o63LcAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.scatter(x, np.exp(-np.sin(x * 6)**2))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
